import React from 'react';
import { connect } from 'dva';
import { routerRedux } from 'dva/router';
import CheckPassword from 'components/account/CheckPassword';

const SignupPasswordPage = ({ location, ...rest }) => {
  const handleAction = (form) => routerRedux.push({
    pathname: '/signup/3',
    state: {
      ...location.state,
      pswd: form.getFieldValue('pswd'),
    },
  });
  return (
    <CheckPassword buttonText="下一步" action={handleAction} />
  );
};

export default connect()(SignupPasswordPage);

